package cn.qihua.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import cn.qihua.model.SysUser;

public interface ISysUserDAO {

	// property constants
	public static final String ORGANIZATION_ID = "organizationId";
	public static final String ROLE_IDS = "roleIds";
	public static final String NAME = "name";
	public static final String USERNAME = "username";
	public static final String PASSWORD = "password";
	public static final String SALT = "salt";
	public static final String PHONE = "phone";
	public static final String QQ = "qq";
	public static final String HI = "hi";
	public static final String EMAIL = "email";
	public static final String LOCKED = "locked";

	public abstract void setSessionFactory(SessionFactory sessionFactory);

	public abstract Boolean save(SysUser transientInstance);

	public abstract void delete(SysUser persistentInstance);

	public abstract SysUser findById(java.lang.Integer id);

	public abstract List findByExample(SysUser instance);

	public abstract List findByProperty(String propertyName, Object value);

	public abstract List findByOrganizationId(Object organizationId);

	public abstract List findByRoleIds(Object roleIds);

	public abstract List findByName(Object name);

	public abstract SysUser findByUsername(Object username);

	public abstract List findByPassword(Object password);

	public abstract List findBySalt(Object salt);

	public abstract List findByPhone(Object phone);

	public abstract List findByQq(Object qq);

	public abstract List findByHi(Object hi);

	public abstract List findByEmail(Object email);

	public abstract List findByLocked(Object locked);

	public abstract List findAll();

	public abstract SysUser merge(SysUser detachedInstance);

	public abstract void attachDirty(SysUser instance);

	public abstract void attachClean(SysUser instance);

	public abstract Boolean update(SysUser transientInstance);

	public abstract boolean changeLocked(int id, Boolean status);

}